<template>
    <div class="code-mark">
        <template v-if="action == 'edit' || action == 'search' ">
            <el-input v-on="$listeners" :value="value" :placeholder="fieldName"></el-input>
        </template>
        <template v-if="action == 'table'">
            <div class="code-mark-table">
                <!--<el-button class="bgbutton color389E0D" v-if="data.product.type === 1">保</el-button>-->
                <!--<el-button class="bgbutton color096DD9">首</el-button>-->
                <span v-if="data.tag">
                    <span v-for="(item,index) in data.tag" :key="index">
                        <el-button v-if="item.type=='pick_address.processed' || item.type=='delivery_address.processed' " class="bgbutton colorFF7875">纠</el-button>
                    </span>
                </span>
                <!--<el-button class="bgbutton colorFF7875">纠</el-button>-->
                <el-button class="bgbutton color389E0D" v-if="data.product && data.product.type === 1">准</el-button>
                <el-button class="bgbutton colorFA8C16" v-if="data.product && data.product.type === 4">次{{data.forecast_complete_time.slice(8,10)}}</el-button>
            </div>
            <!--<div>{{data.end_area_link?(data.end_area_link.name + '-'):''}}{{value}}</div>-->
            <div>{{value}}</div>
        </template>
    </div>
</template>
<script>
    import base from '../base.js';

    export default {
        extends: base,
        props: {},
        data() {
            return {
                searchModel: 'like',
            }
        },
    }
</script>
<style lang="less">
    .code-mark-table{
        .bgbutton{
            padding: 2px;
            background-color: #389E0D;
            font-size: 10px;
            transform: scale(0.8);
            border: none;
            color: #fff;
            margin-left: 0px;
            margin-right: 2px;
        }
        .color389E0D{
            background-color: #389E0D;
        }
        .colorFA8C16{
            background-color: #FA8C16;
        }
        .color096DD9{
            background-color: #096DD9;
        }
        .colorFF7875{
            background-color: #FF7875;
        }
    }
</style>
